#include <iostream>
using namespace std;

const int N = 11;

int n;
int f[1 << N]; // 前缀和数组

void dfs(int left, int right)
{
	if (left > right)	return;
	
	// 判断类型
	char ret;
	int sum = f[right] - f[left - 1];
	if (sum == 0)	ret = 'B';	// 区间全部为0
	else if (sum == right - left + 1)	ret = 'I'; // 区间全部为1
	else ret = 'F';

	// 只有一个字符
	if (left == right)
	{
		cout << ret;
		return;
	}

	int mid = (left + right) / 2;
	dfs(left, mid); 	dfs(mid + 1, right);

	cout << ret;
}

int main()
{
	cin >> n;
	n = (1 << n);

	for (int i = 1; i <= n; i++)
	{
		char ch;	cin >> ch;
		int  t = 0;
		if (ch == '1') t = 1;
		f[i] = f[i - 1] + t;
	}

	dfs(1, n);

	return 0;
}